﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;

namespace ARchGL.Platform.Electrocar.Core
{
    /// <summary>
    /// 数值
    /// </summary>
    [Serializable]
    public class ValueStruct
    {
        /// <summary>
        /// 值
        /// </summary>
        public string Value { get; set; }
        /// <summary>
        /// 参数
        /// </summary>
        public string Unit { get; set; }
    }

    /// <summary>
    /// 数值+文件
    /// </summary>
    [Serializable]
    public class ValueAndFileStruct : ValueStruct
    {
        /// <summary>
        /// 文件标识（来自文件系统）
        /// </summary>
        public Guid FileId { get; set; }
        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { get; set; }
        /// <summary>
        /// 文件路径
        /// </summary>
        public string FilePath { get; set; }
    }

    /// <summary>
    /// 模型属性信息 数据实体
    /// </summary>
    [Table("ev_modelpropertys")]
    public class ModelPropertys : KeyValueBase
    {
        /// <summary>
        /// 项目标识（车型标识）
        /// </summary>
        public Guid ProjectId { get; set; }
        /// <summary>
        /// 模型目录Id
        /// </summary>
        public Guid DirectoryId { get; set; }
        /// <summary>
        /// JSON 值
        /// </summary>
        public string Value { get; set; }
        /// <summary>
        /// 数据类型：1数值、2文件
        /// </summary>
        public int Type { get; set; }
    }
}
